package com.example.boot_6.myconfig;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Configuration
//配置文件前缀   方便文件中书写
@ConfigurationProperties(prefix = "myconfig")
//指定配置文件路径
@PropertySource(value = "classpath:resource.properties")
public class MyResource {

    private String name;
    private String website;
    private String languge;
}
